
<%@ page import="aca.Criterio" %>
<%@ page import="aca.Atividade" %>
<!DOCTYPE html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'turma.label', default: 'Turma')}" />
		<title><g:message code="Configurar Critérios" args="[entityName]" /></title>
		<resource:richTextEditor type="full" />
	</head>
	<body>
	
		<a href="#view-requests" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div class="nav" role="navigation">
			<ul>
				<li><a class="home" href="${createLink(uri: '/user/index')}"><g:message code="default.home.label"/></a></li>
			</ul>
		</div>
		<div id="edit-crit" class="content scaffold-show" role="main">
			<h1><g:message code="Configurar Critérios" args="[entityName]" /></h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<ol class="property-list turma">
				
				<g:if test="${listaCriterios}">
				<li class="fieldcontain">
					<g:form controller="atividade" action="finaliza_criterios" params="[id: atividadeInstance.id]" id="${atividadeInstance.id}">
						<g:each in="${listaCriterios}" status="i" var="crit">
  							<g:each in="${crit.propriedades}" status="j" var="propr" >
  							<p>
  							<g:field type="text" name="nome" value="${crit.especificacao.nome}" size="20" readonly="readonly"/>
  							<g:field type="text" name="key" value="${propr.key}" size="20" readonly="readonly"/>
  							<td><g:textField name="value" size="20" value="${propr.value}" /> ${'default = ' + propr.value}</td></p>
  							</g:each>
  						</g:each>
  						</ol>
  						<fieldset class="buttons">
  						<g:submitButton name="submit" value="Confirma"/>
  						<g:actionSubmit value="Setar Default" action="finaliza_criterios_default" /> 
  						</fieldset>
					</g:form>
					
				</li>
				</g:if>	
			
		</div>
	</body>
</html>
